#include "plugboard.h"

Plugboard::Plugboard()
{
    setRotorLetters(QByteArray("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
}

void Plugboard::setPlugboardPairs(const QMap<char, char> &pairs)
{
    QByteArray letters("ABCDEFGHIJKLMNOPQRSTUVWXYZ");

    QMap<char, char>::const_iterator itor;
    for (itor = pairs.begin(); itor != pairs.end(); itor++) {
        letters[itor.key() - 'A'] = itor.value();
    }
}

Reflector::Reflector()
{

}

void Reflector::setReflectorPairs(const QMap<char, char> &pairs)
{
    setPlugboardPairs(pairs);
}
